#include "CLoginWnd.h"

CLoginWnd::CLoginWnd(){

	// CString strWndClass = AfxRegisterWndClass(CS_VREDRAW | CS_HREDRAW);

	// this->Create(TEXT("LoginWnd"), TEXT("Login"), WS_VISIBLE, CRect(200, 200, 400, 400), NULL, 1234);

	this->m_static_userName = new CStatic();
	this->m_static_password = new CStatic();
	m_static_userName->Create(TEXT("UserName: "), SS_RIGHT, CRect(10, 10, 100, 60), this);
	m_static_password->Create(TEXT("UserName: "), SS_RIGHT, CRect(10, 80, 100, 130), this);

	this->m_btn_login = new CButton();
	m_btn_login->Create(TEXT("Login"), BS_PUSHBUTTON, CRect(50, 160, 100, 210), this, 1);
}


CLoginWnd::~CLoginWnd(){
	if(this->m_static_userName)
		delete m_static_userName;
	if(this->m_static_password)
		delete m_static_password;
	if(this->m_btn_login)
		delete m_btn_login;
}

BOOL CLoginWnd::onLogin(){
	MessageBox(TEXT("Login button clicked"));
	return TRUE;
}